#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<sys/wait.h>
int main()
{
    if(fork() == 0)
    {
        printf("commend begin\n");

      //  execl("/uesr/bin/ls","ls","-l","-a",NULL);
        
      //  execlp("ls","ls","-l","-a",NULL);
      //  char * agrv[] = {
      //    "ls",
      //    "-l",
      //    "-a",
      //    NULL
      //  };
      //  execvp("ls",agrv);
        char * env[]={
          "hahahahhah",
          "hahahahaha",
          "hahahahaha",
          "hahahahaha",
          NULL 
        };
        execle("./myexe","myexe",NULL,env);
        printf("commend end\n");
        exit(-1);
    }

    waitpid(-1,NULL,0);

    printf("wait child success!\n");
    return 0;
}
